package com.flyco.modules.sms.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.flyco.modules.sms.entity.SmsAddbuyBenefit;
import com.flyco.modules.sms.mapper.SmsAddbuyBenefitMapper;
import com.flyco.modules.sms.model.SmsAddbuyBenefitModel;
import com.flyco.modules.sms.service.ISmsAddbuyBenefitService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 加价购商品
 * @Author: flyco
 * @Date:   2020-04-08
 * @Version: V1.0
 */
@Service
public class SmsAddbuyBenefitServiceImpl extends ServiceImpl<SmsAddbuyBenefitMapper, SmsAddbuyBenefit> implements ISmsAddbuyBenefitService {
	
	@Autowired
	private SmsAddbuyBenefitMapper smsAddbuyBenefitMapper;
	
	@Override
	public List<SmsAddbuyBenefit> selectByMainId(Long mainId) {
		return smsAddbuyBenefitMapper.selectByMainId(mainId);
	}

	@Override
	public Page<SmsAddbuyBenefitModel> getAddbuyBenefitProductPage(Page<SmsAddbuyBenefitModel> page, Wrapper<SmsAddbuyBenefitModel> wrapper) {
		return page.setRecords(smsAddbuyBenefitMapper.getAddbuyBenefitProductPage(page, wrapper));
	}
}
